<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@include file="../common/common.jspf"%>
<link rel="stylesheet" href="${ctx}/css/layui.css"  media="all">	
<link rel="stylesheet" href="${ctx}/css/laydate.css"  media="all">	
<script type="text/javascript" src="${ctx}/js/promotion/add.js">
</script>
<script>
			layui.use('laydate', function(){
			  var laydate = layui.laydate;
			  
			  var start = {
			    min: laydate.now()
			    ,max: '2099-06-16 23:59:59'
			    ,istoday: false
			    ,choose: function(datas){
			      end.min = datas; //开始日选好后，重置结束日的最小日期
			      end.start = datas //将结束日的初始值设定为开始日
			    }
			  };
			  
			  var end = {
			    min: laydate.now()
			    ,max: '2099-06-16 23:59:59'
			    ,istoday: false
			    ,choose: function(datas){
			      start.max = datas; //结束日选好后，重置开始日的最大日期
			    }
			  };
			  $('#LAY_demorange_s').onclick = function(){
				 alert(1);
			    start.elem = this;
			    laydate(start);
			  }
			  $('#LAY_demorange_e').onclick = function(){
				  alert(2);
			    end.elem = this
			    laydate(end);
			  } 
			  
			});
		</script>
<style type="text/css">
.col-sm-3 {
	width: 15%;
	float: left;
	text-align: right;
}

.col-sm-9 {
	width: 85%;
	float: left;
	text-align: left;
}

label[class^="btn btn-default"] {
	margin-top: -4px;
}
</style>
</head>
<body>
	<div class="l_err" style="width: 100%; margin-top: 2px;"></div>
	<form id="form" name="form" class="form-horizontal" method="post" style="width:95%;margin-left: 25px;"
		action="${ctx}/promotion/addEntity">
		<section class="panel panel-default">
		<div class="panel-body">
			<div class="form-group">
				<div class="col-sm-3">
					<label class="control-label">促销名称</label>
				</div>
				<div class="col-sm-9">
					<input type="text" class="form-control"
						placeholder="请输入用户名" name="proTitle" id="proTitle">
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">促销类型</label>
				<div class="col-sm-9">
					<select class="form-control" name=proType id="unit">
						<option value="">请选择</option>
						<%-- <c:forEach var="item" items="${goodsUnitList}"> --%>
							<%-- <option value="${item.id}" <c:if test="${item.id==goods.unit}">selected</c:if>>${item.name}</option> --%>
						<%-- </c:forEach> --%>
						<option value="0" selected>订单满减</option>
						<option value="1" >商品满减</option>
						<option value="2" >商品满赠</option>
						<option value="3" >商品打折</option>
					</select>
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">促销开始时间</label>
				<div class="col-sm-9" style="color: red;">
					<input class="layui-input" name="proStart" id="LAY_demorange_s" onclick="layui.laydate({elem: this, istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"><!-- onclick="layui.laydate({elem: this, istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" -->
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">促销结束时间</label>
				<div class="col-sm-9" style="color: red;">
					<input class="layui-input" name="proEnd" id="LAY_demorange_e" onclick="layui.laydate({elem: this, istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"><!-- onclick="layui.laydate({elem: this, istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" -->
				</div>
			</div>
		</div>
		<footer class="panel-footer text-right bg-light lter">
		<button type="submit" class="btn btn-success btn-s-xs">提交</button>
		</footer> </section>
	</form>
	
	<script type="text/javascript">
	onloadurl();
	</script>
	<script type="text/javascript"
		src="${ctx}/js/jquery/bootstrap-filestyle.min.js"></script>
</body>
</html>